Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors with -Config when plugin has no question prompts or indentation #756

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Hossy
Copy link

@Hossy Hossy commented Jul 29, 2024

Summary by Sourcery

This pull request addresses errors in the vCheck.ps1 script related to handling plugins without question prompts and proper indentation. It also includes enhancements to the settings processing logic and updates to documentation comments in specific plugin scripts.

  • Bug Fixes:
    • Fixed error handling in the Get-ID-String function to correctly parse ID names.
    • Resolved issues in the Invoke-Settings function to handle plugins without question prompts and correct indentation.
  • Enhancements:
    • Improved the logic in the Invoke-Settings function to handle settings without question prompts and maintain proper formatting.
  • Documentation:
    • Added comments in Plugins/60 VM/49 EVC Mismatch.ps1 and Plugins/60 VM/79 Find VMs in Uncontrolled Snapshot Mode.ps1 to clarify the purpose of settings.

Add question prompt for $ExcludeVMs for EVC Mismatch
Add question prompt for $ExcludeDS
Fix line-by-line processing of plugins to prevent errors and handle missing question prompts
Copy link

sourcery-ai bot commented Jul 29, 2024

Reviewer's Guide by Sourcery

This pull request addresses errors related to configuration handling when plugins have no question prompts or indentation issues. The main changes include fixing pattern matching in the Get-ID-String function, initializing variables properly, handling cases with no question prompts, and ensuring correct parsing and appending of settings. Additionally, comments were added to plugin files to clarify the purpose of specific settings.

File-Level Changes

Files Changes
Plugins/60 VM/49 EVC Mismatch.ps1
Plugins/60 VM/79 Find VMs in Uncontrolled Snapshot Mode.ps1
Added comments to explain the purpose of settings in the plugin files.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Hossy - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@Hossy
Copy link
Author

Hossy commented Jul 29, 2024

Example for indentation is 04 Map disk region event.ps1 where settings are indented inside an if block. Invoke-Settings will now respect and maintain that indentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant